import fs from 'node:fs';
import path from 'node:path';

export const extname = (p: string): string => path.extname(p);
export const basename = (p: string, ext?: string): string =>
  path.basename(p, ext);
export const dirname = (p: string): string => path.dirname(p);
export const readFile = async (path: string) => fs.promises.readFile(path);
export const copyFile = async (sourcePath: string, distPath: string) => {
  return fs.promises.copyFile(sourcePath, distPath);
};
